binary (parameter type)

Parameters with type="binary" in the parameter definition allow for arbitrary data. These can only be set via file upload.

This is an example definition of a binary parameter:

    {name="MyBinary",
      type="binary",
      default="",
      ui={
         control={
           type="file-upload",
           filter=".dat"}}}

The UI control is an upload button. The button label is customized by mapping the parameter name in the language resource files.

../../../_images/ui-binary-upload-button.png

An upload button

Binary definition table keys

name:

The name of the parameter into which the file content is loaded.

type:

Should always be “binary”.

default:

The default value of the parameter, before upload.

ui:

Table for configuring the upload control.

Sub table “ui” keys

The ui-key is required and should be a table that configures the upload, with the following keys:

type:

Should be "file-upload"

filter:

Filter specifying allowed file extensions. This can be a single string or a list of strings. If not provided, all extensions are allowed.